<div class="comment_info">
    留言数: <?php echo $num;?>
    <span class="sort">
        排序方式:
        <a href="index.php"<?php if(!isset($_GET['sort']))echo 'class="curr"';?>>正序</a>
        <a href="index.php?sort=desc"<?php if(isset($_GET['sort'])&& $_GET['sort']=='desc')echo 'class="curr"';?>>
        </span>
</div>
<ul class="comment">
    <?php foreach($data as $v):?>
    <li>
        <p>用户名: <?php echo $v['poster']?></p>
        <p><?发表时间: <?php echo $v['data']?></p>
        <?php if($v['reply']!==''): ?>
            <li>
                <p>管理员回复: </p>
                <p>嗨，你好。我是管理员，欢迎您的到来。</p>
            </li>
        </ul>
    <?php endif;?>
    </li>
    <?php endForeach;?>
</lu>